//
//  UIViewController+YZImagePicker.h
//  VET
//
//  Created by 刘文靖 on 2018/6/29.
//  Copyright © 2018年 YZ. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIViewController (YZImagePicker)
/**
 *  从相册选图片
 */
- (void)choosePictureFromPhotoLibrary;

- (void)choosePictureFromPhotoLibraryAnimated:(BOOL)animated;

/**
 *  弹出选择照片的ActionSheet界面(可以选择相册或者是摄像头拍摄)
 */
- (void)choosePicture;

/**
 *  直接获取图片(仅需传入代理方法的参数即可)
 */
- (UIImage *)imageFromPickerVC:(UIImagePickerController *)picker
             gotPicWithDicInfo:(NSDictionary *)dicInfo;

/**
 *  GCD异步保存UIImage对象到png格式的文件中去
 *
 *  @param image    UIImage对象
 *  @param filepath 包含文件名的绝对路径
 */
- (void)asyncSaveUIImage:(UIImage *)image intoPNGFilePath:(NSString *)filepath;

/**
 *  关闭ImagePickerView
 */
- (void)dismissImagePicker;

- (BOOL)dismissImagePickerViewController;

- (void)presentImagePickerUsingCamera:(BOOL)useCamera
                        allowsEditing:(BOOL)allowsEditing
                             animated:(BOOL)animated
                           mediaTypes:(NSArray *)mediaTypes;

- (void)yz_presentSelectSheetWithTitle:(NSString *)title
                     cancelButtonTitle:(NSString *)cancelTitle
             twoOtherButtonTitlesArray:(NSArray *)twoOtherTitleArray
                     firstSelBTHandler:(void (^)(void))firstSelBTHandler
                    secondSelBTHandler:(void (^)(void))secondSelBTHandler ;
@end
